package com.sc.server.system.conf.service.impl;
import com.sc.common.util.RedisUtils;
import com.sc.server.system.conf.service.IemailService;
import cn.hutool.extra.mail.MailUtil;
import com.sc.server.system.common.constant.SmsPhoneConst;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class EmailServiceImpl implements IemailService {
    @Autowired
    private RedisUtils redisUtils;
    @Override
    public boolean sendEmailBybindEmail(String email) {
        redisUtils.set(SmsPhoneConst.EMAIL_CODE+email,"323213",2*60);
        MailUtil.send(email,"系统架构设计之发送验证码","您正在通过邮件方式绑定邮箱，你的邮箱验证码是323213",false);
        return true;
    }
}
